﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Grishko.DataTier;
using OutdoorLib.Context;
using Grishko.DataTier.SqlLibrary;
using Grishko.SerilizeTools;
using OutdoorLib.BaseEntity.WS;
using OutdoorLib.BaseEntity.Face;
using OutdoorLib.BaseEntity.Dictionary;


namespace OutdoorLib.BaseEntity.Agency
{
    /// <summary>
    /// Департамент/подразделение 
    /// </summary>
    public class Department : TreeDictionaryItem
    {
      
        
        [SrchItemInfo(TxtPropertyName = "Наименование")]
        public override string Name
        {
            get { return Value.ToString(); }
            set { Value = value; }
        }

        private EntityList _Employees = new EntityList();
                
        [SrchItemInfo(TxtPropertyName = "Сотрудники", ListType = typeof(Employeer))]
        public EntityList Employees { get { return _Employees; } set { _Employees = value; } }

        
        [SrchItemInfo(TxtPropertyName = SrchItemInfo.EmptyString)]
        public override TreeEntityList ChildNodes
        {
            get
            {
                return base.ChildNodes;
            }
        }

        
    }
}
